import Mock from 'mockjs';

let item = [{
		key: "/kc/all",
		method: "get",
		param: {
			
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA|1-4': [{
					"kcid|4": /[A-Z][a-z][0-9][0-9][0-9][0-9][0-9][0-9]/,
					"kcname": "@cword(6,9)",
					"sdz": "@csentence",
					"cover": "https://tse1-mm.cn.bing.net/th/id/OIP-C.0C2Zz8pZZEVhfSgSdZ8WUQHaE7?rs=1&pid=ImgDetMain",
					"jlid":'@id',
					"jlname":'@cname',
					"roomid":'@id',
					"rname":'@ctitle(3, 5)会议室',
					"storeid":'@id',
					"sname":'@city@cword(商城,中心,旗舰店)',
					"jd":'@float(-180, 180, 5, 5)',
					"wd":'@float(-90, 90, 5, 5)',
					"address":'@county(true)',
					"pcode":'@province',
					"scode":'@city',
					"qcode":'@county',
					"zt":"进行中",
					"zxrs": '@natural(1, 5)', // 最小人数（1-5）
					"zdrs": function() {
					  // 正确写法：生成 5-10 的随机数，并确保 zdrs > zxrs
					  return this.zxrs + Mock.Random.natural(5, 10);
					},
					"ybrs": function() {
					  // 正确写法：在 zxrs 和 zdrs 之间生成随机数
					  return Mock.Random.natural(this.zxrs, this.zdrs);
					},
					
											"price":"@float(10, 1000, 2, 2)",
											"ms":'@courseDescription',
											"cs":'@courseDuration',
											"st":'@datetime("HH:mm:ss")',
											"et":function() {                // 结束时间（开始时间+1-3小时）
					    const start = new Date(`2024-01-01 ${this.startTime}`);
					    return new Date(start.getTime() + Mock.Random.integer(1, 3)*60*60*1000)
					            .toTimeString().split(' ')[0];
					  },
					  "kclxid":"1001",
					  "lxname":"拳击类",

				}]
			});
		}
	},
	{
		key: "/kc/page",
		method: "get",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|12": [{
						"kcid|4": /[A-Z][a-z][0-9][0-9][0-9][0-9][0-9][0-9]/,
						"kcname": "@cword(6,9)课",
						"price": 199000,
						"cs": 30,
						"cover": "https://bpic.588ku.com//back_origin_min_pic/23/04/19/a1a09668a47cb287c637c949f1825375.jpg",
						"jlid":'@id',
						"jlname":'@cname',
						"st": "2025-03-29",
						"et": "2025-04-29",
						"zt|1": ["C","D","F","B"],
						"jcover": "https://bpic.588ku.com/element_origin_min_pic/25/02/19/d8244106087c5e8d80fdbe3e602771a3.jpg",
						"zxrs":5,
						"zdrs":30,
						"ybrs":15,
					}]
				}
			});
		}
	},
	{
		key: "/kc/info",
		method: "get",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					"akecheng": {
						"kcid": "1001",
						"kcname": "还我漂漂拳",
						"zxrs": 5,
						"zdrs": 30,
						"ybrs": 25,
						"price":199000,
						ms: `
											            <div>
											              <p>跟我学吧，干就完了。</p>
											              <img src="https://tse1-mm.cn.bing.net/th/id/OIP-C.0C2Zz8pZZEVhfSgSdZ8WUQHaE7?rs=1&pid=ImgDetMain/200x150?text=Image1" alt="Image 1" style="margin-bottom: 10px;">
											            </div>
											          `,
						"cs":24,//课时
						"st":"2003-02-23",//开始时间
						"et":"2003-03-25",//结束时间
						"zt|1":["C","D","F","B"],
						"cover":"https://tse1-mm.cn.bing.net/th/id/OIP-C.0C2Zz8pZZEVhfSgSdZ8WUQHaE7?rs=1&pid=ImgDetMain",
					},
					"ajiaolian":[{
						"jlid":"1101",
						"jlname":"牛教练",
						"tel":"139121212",
						"cover":"https://bpic.588ku.com/element_origin_min_pic/25/02/19/d8244106087c5e8d80fdbe3e602771a3.jpg",
					}],
					"akechenglx":[{
						"kclxid":"201",
						"lxname":"拳击类",
					}],
					"akechengitem":[{
						"kcitemid":"123",
						"itemname":"基础脚步",
						"kcid":"",
						"dt":"2005-01-01",
						"st":"2005-01-01",
						"et":"2005-03-01",
						"rmsyid":"",
						"roomid":"101",
						"rname":"A101房间",
						"storeid":"12312",
						"sname":"高新万达店",
						"cover": "https://bpic.588ku.com//back_origin_min_pic/24/01/13/f07c0ac433e7eb197d2a282dd184355b.jpg",
						
					},
					{
						"kcitemid":"123",
						"itemname":"基础脚步",
						"kcid":"",
						"dt":"2005-01-01",
						"st":"2005-01-01",
						"et":"2005-03-01",
						"rmsyid":"",
						"roomid":"101",
						"rname":"A101房间",
						"storeid":"12312",
						"sname":"高新万达店",
						"cover": "https://bpic.588ku.com//back_origin_min_pic/24/01/13/f07c0ac433e7eb197d2a282dd184355b.jpg",
						
					},
					{
						"kcitemid":"123",
						"itemname":"基础脚步",
						"kcid":"",
						"dt":"2005-01-01",
						"st":"2005-01-01",
						"et":"2005-03-01",
						"rmsyid":"",
						"roomid":"101",
						"rname":"A101房间",
						"storeid":"12312",
						"sname":"高新万达店",
						"cover": "https://bpic.588ku.com//back_origin_min_pic/24/01/13/f07c0ac433e7eb197d2a282dd184355b.jpg",
						
					}],
					"aroom":[{
						roomid:"1012",
						cover:"https://bpic.588ku.com//back_origin_min_pic/23/04/18/24eee4a3abbc28e2e3dec9e09bec8ac6.jpg",
					}]
					
				}
			})
		}
	},

	{
		key: "/kc/info",
		method: "post",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {

				}
			})
		}
	},
	{
		key: "/kc/info",
		method: "put",
		param: {
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {

				}
			})
		}
	},
	{
		key: "/kc/info",
		method: "delete",
		param: {
			empId: '',
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {

				}
			})
		}
	},
	
	{
		key: "/kc/kclx/info",
		method: "delete",
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
	
				}
			})
		}
	},
	
	{
		key: "/kc/kclx/tree",
		method: "get",
		param: {
			
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					akechenglxs: [{
							akclxid: "lx1",
							lxname: "搏击",
							zs: "",
							subs: [{
									akclxid: "lx11",
									lxname: "11A",
									zs: "【lx1】,",
									subs: [{
											akclxid: "lx111",
											lxname: "111A",
											zs: "【lx1】,【lx11】,",
										},
										{
											akclxid: "lx112",
											lxname: "112A",
											zs: "【lx1】,【lx11】,",
										},
									]
								},
								{
									akclxid: "lx12",
									lxname: "12A",
									zs: "【lx1】,",
								},
							]
						},
						{
							akclxid: "lx2",
							lxname: "散打",
							zs: "",
							subs: [{
									akclxid: "lx21",
									lxname: "21A",
									zs: "【lx2】,",
								},
								{
									akclxid: "lx22",
									lxname: "22A",
									zs: "【lx2】,",
								},
							]
						},
					],
				}
			});
		}
	},
	
	

]
export default item;